horizon-pkg:
  pkg.installed:
    - names:
      - openstack-dashboard

horizon-conf:
  file.managed:
    - name: /etc/openstack-dashboard/local_settings
    - source: salt://openstack/queen/horizon/files/local_settings
    - user: root
    - group: root
    - mode: 644
    - template: jinja
    - defaults:
      MEMCACHED_IP: {{ pillar['memcached']['MEMCACHED_IP'] }}
      KEYSTONE_IP: {{ pillar['keystone']['KEYSTONE_IP'] }}
    - require:
      - pkg: horizon-pkg
    - watch_in:
      - service: horizon-http-service

horizon-http-service:
  service.running:
    - name: httpd
    - enable: True
